home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Champak Vol A-4
/
(Vol A-4) Vol. A4.iso
/
Games
/
puppy_red.swf
/
scripts
/
DefineSprite_350
/
frame_20
/
DoAction.as
Wrap
Text File
|
2008-03-11
|
719b
|
41 lines
function betting(score)
{
ranValue = Math.floor(Math.random() * 100) + 1;
if(ranValue <= 5)
{
var sc = score * 3;
var result = 1;
}
else if(ranValue <= 20)
{
var sc = score / 2;
var result = 2;
}
else if(ranValue <= 25)
{
var sc = score / 5;
var result = 3;
}
else if(ranValue <= 40)
{
var sc = score * 2;
var result = 4;
}
else if(ranValue <= 70)
{
var sc = score - 500;
var result = 5;
}
else if(ranValue <= 100)
{
var sc = score;
var result = 6;
}
if(sc < 0)
{
sc = 0;
}
var rarray = [result,Math.floor(sc)];
return rarray;
}